
var hh= '<div class=""am-u-lg-4 am-u-md-6"" >'+
'div class=""article"">'+


			<!-- <div class="am-u-lg-4 am-u-md-6" > -->
			'<div class=""am-u-lg-4 am-u-md-6"" >'+
                <!-- <div class="article"> -->
                '<div class="article">'+
                  <!-- <div class="article-img">
                    <img src="../assets/images/news/b01.jpg" alt="" />
                  </div> -->
                  
                  '<div class=""article-img"">'+
                  '<img src=""../assets/images/news/b01.jpg"" alt="""" />'+
                  '</div>'+
                  <!-- <div id="articleheader" class="article-header"> -->
                  '<div id=""articleheader"" class=""article-header"">'+
                   <!-- <h2><a th:href="@{'newsInfo?id='+${m.id}}" th:text="${m.title}" class="link" target="_blank">云适配：价值驱动是占有市场的关键</a></h2>
                    -->
                   '<h2>'+ 
                   '<a href=""newsInfo?id=' + data[p].id + '"" class=""link"" target=""_blank"">' + data[p].title + '</a>' + 
                   '</h2>'
           
                   <!-- <ul class="article--meta">
                      <li class="article--meta_item -date">December 28, 2015</li>
                    </ul> -->
                    '<ul class=""article--meta"">'+
                      '<li class=""article--meta_item -date"">December 28, 2015</li>'+
                    '</ul>'+
                  <!-- </div> -->
                  '</div>'+
                  <!-- <div class="article--content" th:text="${m.text}"> -->
                  '<div class="article--content">'+
                  data[p].text+
                  '</div>'+
                  <!-- div class="article--footer"> -->
                  '<div class=""article--footer"">'+
  						<!-- <a th:href="@{'demo?id='+${m.id}}" class="link" target="_blank">Read More</a></div>
                 -->
  
                 '<a href=""newsInfo?id=' + data[p].id + '"" class=""link"" target=""_blank"">' + 'Read More' + '</a>' + 

                 <!-- </div> 
              </div>
            </div> -->
				'</div></div></div>';
              
            


				<a href = "newsInfo?id=3" class="link" target="_blank"></a>


              <div class="am-u-lg-4 am-u-md-6" >
                <div class="article">
                  <div class="article-img">
                    <img src="../assets/images/news/b01.jpg" alt="" />
                  </div>
                  <div id="articleheader" class="article-header"> 
                  <h2><a th:href="@{'newsInfo?id='+${m.id}}" th:text="${m.title}" class="link" target="_blank"></a></h2>
                   <ul class="article--meta">
                      <li class="article--meta_item -date">December 28, 2015</li>
                    </ul>
                  </div>
                  <div class="article--content" th:text="${m.text}">
                  </div>
                  <div class="article--footer">
  						<a th:href="@{'demo?id='+${m.id}}" class="link" target="_blank">Read More</a></div>
                </div> 
              </div>
            </div>
            
            
            
            
            
'<dl><h3><a href="'+info.CntURL+'?ContentId='+info.contentId+'" title="'+info.caption+'" >'+info.caption+'</a>
</h3><dt><a href="sjjm.jsp?ContentId='+info.contentId+'" title="'+info.caption+'" ><img src="<%=basePathPic%>'+info.refPic+'" alt="'+info.caption+' width="150" height="95""></a></dt>  <dd class="shortdd">'+info.text+'</dd><span>发布时间：'+info.createDate+'</span></dl>'


<a href = "newsInfo?id=3" class="link" target="_blank"></a>

		<!-- <div class="am-u-md-3"> -->
		'<div class=""am-u-md-3"">'+
			<!-- <a th:href="@{'productInfo?id='+${m.id}}" class="link" target="_blank"> -->
			'<a href=""productInfo?id=' + data[p].id + '"" class=""link"" target=""_blank"">'+ 
				<!-- <img src="assets/images/img-1.jpg" alt="" /> -->
				'<img src=""assets/images/img-1.jpg"" alt="""" />'+
				<!-- <div class="am-panel am-panel-default" style="padding: 0 10px"> -->
				'<div class=""am-panel am-panel-default"" style=""padding: 0 10px"">'+
					<!-- <h3 th:text="${m.name}">岁数大多</h3> -->
					'<h3 th:text=""'+data[p].name+'"">岁数大多</h3>'+
					<!-- <p class="am-kai" th:text="${m.text}"></p> -->
					'<p class=""am-kai"" th:text=""'+data[p].text+'""></p>'+
				<!-- </div></a> <span>了解更多></span></div> -->
				'</div></a> <span>了解更多></span></div>'

'<div class=""am-u-md-3"">'+
'<a href=""productInfo?id=' + data[p].id + '"" class=""link"" target=""_blank"">'+
'<img src=""assets/images/img-1.jpg"" alt="""" />'+
'<div class=""am-panel am-panel-default"" style=""padding: 0 10px"">'+
'<h3 th:text=""'+data[p].name+'"">岁数大多</h3>'+
'<p class=""am-kai"" th:text=""'+data[p].text+'""></p>'+
'</div></a> <span>了解更多></span></div>'



<script th:inline="javascript">
	/* var ppp='<%=request.getAttribute("ppppp")%>'; */
	/*  var ppp = [[${ppppp}]]; */
	var pageIndex = document.getElementById('hideIndex');
	console.log('m1');
	console.log(document.getElementById('hideIndex').value);
	console.log('m2');
	//var pageIndex = 0;     //页面索引初始值
	var pageSize = 3; //每页显示条数初始化，修改显示条数，修改这里即可
	function() {
		InitTable(0); //Load事件，初始化表格数据，页面索引为0（第一页）                                                
		//分页，PageCount是总条目数，这是必选参数，其它参数都是可选  
		$("#Pagination").pagination(50, {
			callback : PageCallback,
			prev_text : '上一页', //上一页按钮里text  
			next_text : '下一页', //下一页按钮里text  
			items_per_page : pageSize, //显示条数  
			num_display_entries : 6, //连续分页主体部分分页条目数  
			current_page : pageIndex, //当前页索引  
			num_edge_entries : 2
		//两侧首尾分页条目数  
		});

		//翻页调用  
		function PageCallback(index, jq) {
			var typeIndex = document.getElementById("typeIndex").value;
			InitTable(index, typeIndex);
		}
		//请求数据  
		function InitTable(pageIndex, typeIndex) {
			console.log('typeinde');
			console.log(typeIndex);
			$
					.ajax({
						type : "POST",
						dataType : "json",
						url : '/loans/gw_product_page', //提交到一般处理程序请求数据  
						data : "pageIndex=" + (pageIndex + 1) + "&typeIndex="
								+ typeIndex,
						success : function(data) {
							var htmla = '';
							for ( var p in data) {
								var tmp = '<div class="am-u-md-3">'
										+ '<a href="productInfo?id='
										+ data[p].id
										+ '" class="link" target="_blank">'
										+ '<img src="assets/images/img-1.jpg" alt="" />'
										+ '<div class="am-panel am-panel-default" style="padding: 0 10px">'
										+ '<h3 th:text="'+data[p].name+'">岁数大多</h3>'
										+ '<p class="am-kai" th:text="'+data[p].text+'"></p>'
										+ '</div></a> <span>了解更多></span></div>';

								htmla += tmp;
							}
							$('#productcontainer1').html(htmla);
						}
					});
			document.getElementById('hideIndex').value = pageIndex;
			console.log('end');
			console.log(document.getElementById('hideIndex').value);
			/* document.getElementById('id').value = id; */
		}
	}
</script>












var div2=document.getElementById("litab2");
div2.onclick= function(){
	var tmp = 2;
	document.getElementById('typeIndex').value=tmp;
	var tmpIndex = 0;
	document.getElementById('hideIndex').value=tmpIndex;
	InitTable(0);    //Load事件，初始化表格数据，页面索引为0（第一页）                                                
    //分页，PageCount是总条目数，这是必选参数，其它参数都是可选  
    $("#Pagination").pagination(50, {  
        callback: PageCallback,  
        prev_text: '上一页',       //上一页按钮里text  
        next_text: '下一页',       //下一页按钮里text  
        items_per_page: pageSize,  //显示条数  
        num_display_entries: 6,    //连续分页主体部分分页条目数  
        current_page: pageIndex,   //当前页索引  
        num_edge_entries: 2        //两侧首尾分页条目数  
    });
    
  //翻页调用  
    function PageCallback(index, jq) {
    	var typeIndex = document.getElementById("typeIndex").value;
    	var hideIndex = document.getElementById("hideIndex").value;
    	console.log('hideIndex');
    	console.log(hideIndex);
        InitTable(hideIndex,typeIndex);
    }
  //请求数据  
    function InitTable(pageIndex,typeIndex) { 
    	console.log('typeinde');
    	console.log(typeIndex);
        $.ajax({   
            type: "POST",  
            dataType: "json",  
            url: '/loans/gw_product_page',      //提交到一般处理程序请求数据  
            data: "pageIndex=" + (pageIndex + 1)+"&typeIndex="+typeIndex,
            success: function(data) {
            	var htmla = '';
            	for(var p in data){
            		var tmp = '<div class="am-u-md-3">'+
                	'<a href="productInfo?id=' + data[p].id + '" class="link" target="_blank">'+
                	'<img src="assets/images/img-1.jpg" alt="" />'+
                	'<div class="am-panel am-panel-default" style="padding: 0 10px">'+
                	'<h3 th:text="'+data[p].name+'">岁数大多</h3>'+
                	'<p class="am-kai" th:text="'+data[p].text+'"></p>'+
                	'</div></a> <span>了解更多></span></div>';
                	
                	htmla += tmp;
            	}
            	$('#productcontainer1').html(htmla);
            }
        });
        document.getElementById('hideIndex').value=pageIndex;
        console.log('end');
        console.log(document.getElementById('hideIndex').value);
        /* document.getElementById('id').value = id; */
    };
}
